home *** CD-ROM | disk | FTP | other *** search
/ Champak 49 / Volume 49 - JOGO DISK .iso / Games / evilswitch.swf / scripts / DefineSprite_53 / frame_2 / DoAction.as
Encoding:
Text File  |  2007-09-27  |  859 b   |  40 lines

  1. this.init = function()
  2. {
  3.    this.attachMovie("mc.number","nums_mc",1);
  4.    this.nums_mc.pId = 1;
  5.    this.nums_mc.pSnapping = true;
  6.    this.nums_mc._x = 141;
  7.    this.nums_mc._y = 17;
  8.    this.nums_mc._xscale = 80;
  9.    this.nums_mc._yscale = 80;
  10.    this.pScore = 0;
  11.    this.pBonus = 0;
  12.    this.pLevel = 0;
  13. };
  14. this.getScore = function()
  15. {
  16.    return this.pScore;
  17. };
  18. this.updateScore = function(t)
  19. {
  20.    this.pScore += t * 5 * this.pBonus;
  21.    this.nums_mc.setValue(this.pScore);
  22. };
  23. this.updateBonus = function(t)
  24. {
  25.    this.pBonus = this.pBonus + 1;
  26.    this.bonus_mc.setValue(this.pBonus);
  27. };
  28. this.clearBonus = function(t)
  29. {
  30.    this.pBonus = 0;
  31.    this.bonus_mc.setValue(this.pBonus);
  32. };
  33. this.updateLevel = function()
  34. {
  35.    this.pLevel = this.pLevel + 1;
  36.    this.level_mc.setValue(this.pLevel);
  37. };
  38. this.init();
  39. this.updateLevel();
  40.